#include <stdio.h>
#include <string.h>
#pragma pack(1) // 内存对齐

union Data
{
    int i;
    double f;
    char str[9];
};
struct Data1
{
    int i;
    double f;
    char str[9];
};
int main()
{
    union Data data;
    struct Data1 data1;
    printf("Memory size occupied by union data : %lld\n", sizeof(data));
    printf("Memory size occupied by struct data : %lld\n", sizeof(data1));

    data.i = 35;
    data.f = 68.899;
    strcpy(data.str, "Week20");

    return 0;
}
